3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next
QuickDraw 3D allows you to define object types in addition to those it provides itself. For example, you can add a custom type of attribute so that you can attach custom data to objects or parts of objects in a model. Similarly, you can add custom types of geometric objects if those supplied by QuickDraw 3D are not sufficient for your needs.
Custom objects use the following type definition:
typedef struct TQ3ObjectClassPrivate *TQ3ObjectClass;
To define a custom object type, you first define the structure of the data associated with your custom object type. Then you must write an object metahandler to define a set of object-handling methods. QuickDraw 3D calls those methods at certain times to handle operations on your custom object. For example, when someone calls Q3Object_Submit to draw an object of your custom type, QuickDraw 3D must call your object's drawing method.
Previous | QD3D Book | Overview | Chapter Contents | Next